﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using JiraGenCommon.Constants;

namespace JiraGenCommon.Helpers
{
    public class LogHelper
    {
        private static readonly ILog Log = LogManager.GetLogger(typeof(LogHelper));

        public static void Write(string logMsg, LogLevel logLevel )
        {
            switch (logLevel)
            {
                case LogLevel.Warn:
                    Log.Warn(logMsg);
                    break;
                case LogLevel.Info:
                    Log.Info(logMsg);
                    break;
                case LogLevel.Fatal:
                    Log.Fatal(logMsg);
                    break;
                case LogLevel.Debug:
                    Log.Debug(logMsg);
                    break;
                case LogLevel.Error:
                    Log.Error(Log);
                    break;
            }
        }
    }
}
